package com.foruo.learn.designmode.observer;

/**
 * 订阅者
 * @author GaoYuan
 * @date 2018/11/11 上午9:56
 */
public abstract class Subscriber {

    abstract void answer(String msg);

    /** 订阅 */
    void subscribe(Publisher publisher){
        publisher.add(this);
    }

}
